
<template>
      <el-container><el-select v-model="value" size="mini" style="width:100%;">
              <el-option
                v-for="item in options"
                :key="item.bzcode"
                :label="item.bzname"
                :value="item.bzcode">
              </el-option>
            </el-select>
      </el-container>
</template>
<script>
  import request from "@/utils/requestutil";
  export default {
    data() {
      return {
        options:[],
        value:""
      }
    },
    created() {
      this.yw_select()
    },
    watch:{
      value:{
        handler(newV,oldVal){
          if(newV)
          this.$emit("change",newV);
        },
        deep: true,
        immediate: true
      }
    },
    methods: {
      //加载业务的下拉框
      yw_select()
      {
        request({
          url:"zb_yw_data",
          method:"post"
        }).then((strData)=>{
          this.options=strData.data;
          this.value="TBJJ"
        })
      },
    }

  };
</script>
